﻿using Microsoft.Extensions.Diagnostics.HealthChecks;

namespace HttpClientStudy.WebApp
{
    /// <summary>
    /// 健康检查
    /// </summary>
    public class HealthCheck : IHealthCheck
    {
        /// <summary>
        /// 健康检查该方法
        /// </summary>
        /// <param name="context">健康检查上下文</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
        {
            return Task.FromResult( HealthCheckResult.Healthy("ok"));
        }
    }
}
